package com.example.module_mine.login.loginnet

import com.example.lib_net.BaseResponse
import com.example.module_mine.register.registernet.RegisterModel
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface MineApi {
    //登录
    @POST("/api/user/login")
    suspend fun login(
        @Query("username") username: String,
        @Query("password") password: String
    ): BaseResponse<LoginModel>

    //注册
    @POST("/api/user/register")
    suspend fun register(
        @Query("username") username: String,
        @Query("password") password: String
    ): BaseResponse<RegisterModel>

    //我的
    @GET("")
    suspend fun getMine(): BaseResponse<List<MineModel>>
}

class MineModel {
    var img: Int
    var name: String

    constructor(img: Int, name: String) {
        this.img = img
        this.name = name
    }
}